# Contributor: viest <dev@service.viest.me>
# Maintainer: viest <dev@service.viest.me>
pkgname=php7-pecl-xlswriter
_pkgreal=xlswriter
pkgver=1.3.6
pkgrel=0
pkgdesc="A PHP Extension for creating and reader XLSX files. "
url="https://pecl.php.net/package/xlswriter"
arch="all !s390x !mips !mips64" # Test failure
license="BSD-2-Clause"
depends="php7-common"
makedepends="php7-dev zlib-dev"
source="$pkgname-$pkgver.tar.gz::https://pecl.php.net/get/$_pkgreal-$pkgver.tgz"
builddir="$srcdir"/$_pkgreal-$pkgver

build() {
	phpize7
	./configure \
		--enable-reader \
		--prefix=/usr \
		--with-php-config=/usr/bin/php-config7
	make
}

check() {
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test
}

package() {
	make INSTALL_ROOT="$pkgdir/" install
	install -d "$pkgdir"/etc/php7/conf.d
	echo "extension=$_pkgreal.so" > "$pkgdir"/etc/php7/conf.d/$_pkgreal.ini
}

sha512sums="b4dc55ec55032361157753aed8f66cdde2c34b4cf5d9c86c33799dd157025ba648fff7aa7f545c17c43ba177f0194787cdf07a4b718d33e81f84c47f0f17a878  php7-pecl-xlswriter-1.3.6.tar.gz"
